#include<iostream>
using namespace std;
int main(){
    int cm,inch;cin>>cm;
    int inchbak=cm*12/30.48;
    inch=inchbak%12;
    int  foot=(inchbak-inch)/12;
    
    cout<<foot<<" "<<inch<<endl;
    return 0;
}
